package lee.vioson.remotedata.utils

import android.util.Log
import lee.vioson.repository.BuildConfig

/**
 *Author:viosonlee
 *Date:3/22/21
 *DESCRIPTION:
 */
object LogUtil {
    private const val TAG = "LogUtil"
    private val showLog:Boolean
        get() = BuildConfig.DEBUG
    fun d(tag: String? = TAG, msg: String) {
        if (showLog) {
            Log.d(tag, msg)
        }
    }

    fun w(tag: String? = TAG, msg: String) {
        if (showLog) {
            Log.w(tag, msg)
        }
    }

    fun i(tag: String? = TAG, msg: String) {
        if (showLog) {
            Log.i(tag, msg)
        }
    }

    fun e(tag: String? = TAG, msg: String) {
        if (showLog) {
            Log.e(tag, msg)
        }
    }

}